package com.yidu.hbatsams.dao;

import com.yidu.hbatsams.domain.AtsScheme;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AtsSchemeMapperfx {
    List<AtsScheme> findAll(@Param("schemeType")String schemeType,@Param("schemeName")String schemeName,@Param("stime")String stime,@Param("etime")String etime);

    /**
     *
     * @mbg.generated 2019-10-29
     */
    int deleteByPrimaryKey(Integer schemeId);
    int count(@Param("schemeName")String schemeName,@Param("stime")String stime,@Param("etime")String etime,@Param("schemeType")String schemeType);
    /**
     *
     * @mbg.generated 2019-10-29
     */
    int insert(AtsScheme record);

    /**
     *
     * @mbg.generated 2019-10-29
     */
    int insertSelective(AtsScheme record);

    /**
     *
     * @mbg.generated 2019-10-29
     */
    AtsScheme selectByPrimaryKey(Integer schemeId);

    /**
     *
     * @mbg.generated 2019-10-29
     */
    int updateByPrimaryKeySelective(AtsScheme record);

    /**
     *
     * @mbg.generated 2019-10-29
     */
    int updateByPrimaryKey(AtsScheme records);
    AtsScheme findById(Integer schemeId);
    /**
     * 修改状态
     * @param schemeId
     * @return
     */
    int updateId(Integer schemeId);

    /**
     * 权限：运动员
     * @param schemeType
     * @param athleteId
     * @return
     */
    List<AtsScheme> findAthlete(@Param("schemeType")String schemeType,@Param("schemeName")String schemeName,@Param("stime")String stime,@Param("etime")String etime, @Param("athleteId") String athleteId);
    int countAthlete(String schemeType,String schemeName,String stime,String etime,String athleteId);

    /**
     * 权限：教练
     * @param schemeType
     * @param coachId
     * @return
     */
    List<AtsScheme> findCoach(@Param("schemeType")String schemeType,@Param("schemeName")String schemeName,@Param("stime")String stime,@Param("etime")String etime,@Param("coachId") Integer coachId);
    int  countCoach(String schemeType,String schemeName,String stime,String etime,Integer coachId);
    List<AtsScheme> findExpert(@Param("schemeType")String schemeType,@Param("schemeName")String schemeName,@Param("stime")String stime,@Param("etime")String etime,@Param("expertId") Integer expertId);
    int countExpert(String schemeType,String schemeName,String stime,String etime,Integer expertId);


}